<template>
  <fieldset>
    <legend>md的父组件</legend>
    <button @click="go">回到过去</button>
    <mod :visible="isshow" @on-confirm="confirm" @on-cancel="cancel">
        <template slot="alert">
            <h1>最后一次问你</h1>
        </template>
        <template slot="text">
            <h3>想回到过去吗？</h3>
        </template>
        <!-- <template>
            <h5>哈哈哈哈哈哈</h5>
        </template> -->
    </mod>
  </fieldset>
</template>
<style>
</style>
<script>
import mod from "./modal.vue";
export default {
  data() {
    return {
      isshow: false,
    };
  },
  components: {
    mod,
  },
  methods: {
    go() {
      console.log("我想说我不难过");
      this.isshow = true;
      // console.log(this.confirm);
    },
    confirm() {
        console.log(1111111111);
      this.isshow = false;
    },
    cancel() {
      this.isshow = false;
    },
  },
};
</script>
